// -----------------------------------------------------------------------
//  <copyright file="IHasIntegrationEvent.cs" company="LiuliuSoft">
//      Copyright (c) 2022-2022 DaprPlus. All rights reserved.
//  </copyright>
//  <site>https://www.dapr.plus</site>
//  <last-editor>郭明锋</last-editor>
//  <last-date>2022-11-15 15:14</last-date>
// -----------------------------------------------------------------------


namespace DaprPlus.Domain.Entity;

/// <summary>
/// 定义包含集成事件
/// </summary>
public interface IHasIntegrationEvent
{
    /// <summary>
    /// 集成事件集合
    /// </summary>
    public IReadOnlyList<IntegrationEvent> IntegrationEvents { get; }

    /// <summary>
    /// 添加集成事件
    /// </summary>
    /// <param name="integrationEvent"></param>
    void AddIntegrationEvent(IntegrationEvent integrationEvent);

    /// <summary>
    /// 清空当前实体内的集成事件
    /// </summary>
    void ClearIntegrationEvents();
}
